import requests
import json
import uuid

def get_token():
    with open(r'D:\AC_FUNCTION\Flask\assets\database.txt', 'r', encoding='utf-8') as f:
        print('读取数据库成功')
        res = f.read()
        token, name = res.split(',')
    return token, name
def api_get():
    rest = requests.get('http://127.0.0.1:5000/index?user=admin&password=123465')
    return rest.text

def api_post():
    url = 'http://127.0.0.1:5000/index'
    headers = {'Content-Type': 'application/json'}
    data = json.dumps({'user':'admin','password':'123456'})
    rest = requests.post(url,headers=headers,data=data)
    return rest.text

if __name__ == '__main__':
    pass
    print(uuid.uuid4())
    list = [1,2,3,4,5]
    if 6 not in list:
        print('1在列表中')
